from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from puzzle.board import Board

class SBoard:
    def __init__(
        self,
        board: "Board",
        bd: list[list[int]],
        x_map: list[list[int]],
        y_map: list[list[int]],
        row_map: list[list[int]],
        col_map: list[list[int]],
    ) -> None:
        self.board = board
        self.bd = bd
        self.x_map = x_map
        self.y_map = y_map
        self.row_map = row_map
        self.col_map = col_map
        
    def get_row(self, x: int, y: int) -> int | None:
        if (x < 0) or (x > 10):
            return None
        if (y < 0) or (y > 5):
            return None
        return self.row_map[x][y]
    
    def get_col(self, x: int, y: int) -> int | None:
        if (x < 0) or (x > 10):
            return None
        if (y < 0) or (y > 5):
            return None
        return self.col_map[x][y]
